From 8806f6e32e179d0201902f22dcfb05ae5cf9cf26 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 9 Mar 2008 00:38:34 +0000 Subject: [PATCH] pcx: Write waypoint altitude. Fix depending testo sequence. --- pcx.c | 4 ++-- testo | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcx.c b/pcx.c index 7401e147e..d447ec76f 100644 --- a/pcx.c +++ b/pcx.c @@ -319,7 +319,7 @@ gpsutil_disp(const waypoint *wpt) } - gbfprintf(file_out, "W %-6.6s %c%08.5f %c%011.5f %s %5d %-40.40s %5e %d\n", + gbfprintf(file_out, "W %-6.6s %c%08.5f %c%011.5f %s %5.f %-40.40s %5e %d\n", global_opts.synthesize_shortnames ? mkshort_from_wpt(mkshort_handle, wpt) : wpt->shortname, @@ -328,7 +328,7 @@ gpsutil_disp(const waypoint *wpt) lon < 0.0 ? 'W' : 'E', fabs(lon), tbuf, - -9999, + (wpt->altitude == unknown_alt) ? -9999 : wpt->altitude, (wpt->description != NULL) ? wpt->description : "", 0.0, icon_token); diff --git a/testo b/testo index e9b3ca012..6f2b80a78 100755 --- a/testo +++ b/testo @@ -163,7 +163,7 @@ compare ${REFERENCE}/xmap ${TMPDIR}/xmap # PCX (Garmin mapsource import) file format rm -f ${TMPDIR}/mm.pcx ${TMPDIR}/pcx.gps -${PNAME} -i geo -f ${REFERENCE}/../geocaching.loc -o pcx -F ${TMPDIR}/mm.pcx +${PNAME} -i gpx -f ${REFERENCE}/geocaching.gpx -o pcx -F ${TMPDIR}/mm.pcx ${PNAME} -i pcx -f ${TMPDIR}/mm.pcx -o gpsutil -F ${TMPDIR}/pcx.gps compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt ${PNAME} -t -i gpx -f ${REFERENCE}/track/tracks.gpx -o pcx -F ${TMPDIR}/pcx.trk -- 2.30.2